
Pod::Spec.new do |s|
  s.name             = 'ACFramework'
  s.version          = '0.6.0'
  s.summary          = '基础组件库。包含基类、分类、功能类、视图类、加强版...'
  s.description      = <<-DESC
    基础组件与加强版，默认全部导入基础组件；
    只需要其中一种，可以自定义导入,如：'ACFramework/ACBase'；
    加强版需要单独导入 'ACFramework/ACPlus'；
    也可以直接导入二进制的 framework，如：'ACFramework/debug_framework' (目前是基本版的二进制库)
                       DESC

  s.homepage         = 'https://gitee.com/honeycao/ACFramework'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'honeycao' => 'honeycao9268@163.com' }
  s.source           = { :git => 'https://gitee.com/honeycao/ACFramework.git', :tag => s.version.to_s }
 
  s.ios.deployment_target = '8.0'

  s.source_files = 'ACFramework/*.{h,m}'
  s.public_header_files = 'ACFramework/*.{h}'
  s.default_subspec = 'All'

  # 默认引入全部基础子类，不包括 ACPlus
  s.subspec 'All' do |ss|
    ss.dependency 'ACFramework/ACMacro'
    ss.dependency 'ACFramework/ACBase'
    ss.dependency 'ACFramework/ACCategory'
    ss.dependency 'ACFramework/ACFoundation'
    ss.dependency 'ACFramework/ACKit'
  end

  # 宏
  s.subspec 'ACMacro' do |ss|
    ss.source_files = 'ACFramework/ACMacro/*.h'
  end

  #基类
  s.subspec 'ACBase' do |ss|
    ss.source_files = 'ACFramework/ACBase/*.{h,m}'
    ss.dependency 'ACFramework/ACFoundation'
    ss.dependency 'YYModel'
    ss.dependency 'MJRefresh'
    ss.dependency 'DZNEmptyDataSet'
    ss.frameworks = 'UIKit', 'AVFoundation'
  end

  # 分类
  s.subspec 'ACCategory' do |ss|
    ss.source_files = 'ACFramework/ACCategory/**/*'
    ss.dependency 'YYModel'
    ss.dependency 'SDWebImage'
    ss.frameworks = 'UIKit', 'AVFoundation', 'Accelerate', 'Photos'
  end

  #功能类
  s.subspec 'ACFoundation' do |ss|
    ss.source_files = 'ACFramework/ACFoundation/*.{h,m}'
    ss.dependency 'ACFramework/ACMacro'
    ss.dependency 'ACFramework/ACCategory'
    ss.dependency 'AFNetworking'
    ss.dependency 'SDWebImage'
    ss.dependency 'MBProgressHUD'
    ss.resources = "ACFramework/ACFramework.bundle"
    ss.frameworks = 'UIKit', 'AVFoundation', 'EventKit', 'CoreTelephony', 'SystemConfiguration', 'AssetsLibrary', 'Photos', 'AudioToolbox'
  end

  #视图类
  s.subspec 'ACKit' do |ss|
    ss.source_files = 'ACFramework/ACKit/*.{h,m}'
    ss.frameworks = 'UIKit', 'AVFoundation'
  end
  
  ##!! 加强版功能，针对项目中实际的使用而添加，具体使用具体添加
  s.subspec 'ACPlus' do |ss|
      ss.source_files = 'ACFramework/ACPlus/**/*'
      ss.frameworks = 'UIKit', 'AVFoundation'
  end

  # 基础版的 debug framework
  s.subspec 'debug_framework' do |ss|
    ss.source_files = "Frameworks/Debug/ACFramework.framework/Headers/*.{h}"
    ss.public_header_files = "Frameworks/Debug/ACFramework.framework/Headers/*.{h}"
    ss.ios.vendored_framework = "Frameworks/Debug/ACFramework.framework"
    ss.dependency 'AFNetworking'
    ss.dependency 'SDWebImage'
    ss.dependency 'MBProgressHUD'
    ss.dependency 'YYModel'
    ss.dependency 'MJRefresh'
    ss.dependency 'DZNEmptyDataSet'
  end

  # 基础版的 release framework
  s.subspec 'release_framework' do |ss|
    ss.source_files = "Frameworks/Release/ACFramework.framework/Headers/*.{h}"
    ss.public_header_files = "Frameworks/Release/ACFramework.framework/Headers/*.{h}"
    ss.ios.vendored_framework = "Frameworks/Release/ACFramework.framework"
    ss.dependency 'AFNetworking'
    ss.dependency 'SDWebImage'
    ss.dependency 'MBProgressHUD'
    ss.dependency 'YYModel'
    ss.dependency 'MJRefresh'
    ss.dependency 'DZNEmptyDataSet'
  end

end
